forAll (mesh.boundary(), patchI)
{
    if (isA<immersedBoundaryFvPatch>(mesh.boundary()[patchI]))
    {
        Info<< "Found immersed boundary patch " << patchI
            << " named " << mesh.boundary()[patchI].name()
            << endl;

        const immersedBoundaryFvPatch& ibPatch =
            refCast<const immersedBoundaryFvPatch>
            (
                mesh.boundary()[patchI]
            );
            
        cellIbMask = ibPatch.gamma();
        cellIbMaskExt = ibPatch.gammaExt();
        faceIbMask = ibPatch.sGamma();
    }
}
